
package com.applink.sell_proof.fragment.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.applink.sell_proof.fragment.QuizLearnFragment;
import com.applink.sell_proof.fragment.TipsLearn;


/**
 * @author Hoang Viet
 * 
 */
public class LearnFragmentPagerAdapter extends BaseFragmentPagerAdapter
{	
	private static final String[] TITLES = new String[] {"TIP", "QUIZ"};

	public LearnFragmentPagerAdapter(FragmentManager fm)
	{
		super(fm, TITLES);
	}

	@Override
	public Fragment getItem(int index)
	{		
		switch (index)
		{
			case 0:
				TipsLearn fragment0 = new TipsLearn();
				mFragments.put(index, fragment0);
				
				return fragment0;

			case 1:
				QuizLearnFragment quiz = new QuizLearnFragment();
				mFragments.put(index, quiz);
				return quiz;
			default:
				return null;
		}
	}
}
